﻿@model sipfe.model.dataAccess.SIPMaeConvocatoria
@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/convocatoria/_LayoutConvocatoria.cshtml";
    var claseTramite = new List<SelectListItem> { 
        new SelectListItem { Text = "BECA", Value = "2109"}
    };         
}
<script type="text/javascript">
    $(function () {
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");
        inicioPopPupModal("#divTarifario", 500, 950, "REGISTROS ENCONTRADOS EN EL TARIFARIO");
        calendarioGeneral('dFecIniVig', '0');
        calendarioGeneral('dFecFinVig', '0');
    });
    
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.convocatoriaJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.calendarioJS)" ></script>
<center>
    @using (Html.BeginForm("AddNuevaConvocatoria", "Convocatoria", FormMethod.Post))
    {
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" class="tituloWhite8">
            <tr>                
                <td align="right">@ViewBag.TITULO</td>
            </tr>
        </table>
        <br/>
@Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
<fieldset style="width: 750px;" class="fieldsetStyle1">
<legend class="tituloBlue9">DATOS GENERALES DE LA CONVOCATORIA</legend>
<table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
    <tr>
        <td>
            <table border="0" style="width: 100%;" cellpadding="1" cellspacing="0">
            <tbody class="tituloCelesteN8">
            <tr align="center">
                <td align="left">Inicio de Vigencia<span class="asterisco">(*)</span></td>
                <td>Fin de Vigencia</td>
                <td>Tipo de Convocatoria<span class="asterisco">(*)</span></td>
                <td># Total de Becas<span class="asterisco">(*)</span></td>
            </tr>
                <tr  align="center">
                <td align="left">@Html.TextBox("dFecIniVig", null, new { style = "width:70px;", maxlength = 120 })</td>
                <td>@Html.TextBox("dFecFinVig", null, new { style = "width:70px;", maxlength = 120 })</td>
                <td>@Html.DropDownList("nIdeTipoConvo", (IEnumerable<SelectListItem>)ViewBag.TipoConvocatoria, "--Seleccione--", new { @class = "select8" })</td>
                <td>@Html.TextBox("nCantTotaBeca", null, new { style = "width:40px;", maxlength = 4,onkeypress = "return validarSoloNumeros(event);" })</td>
            </tr>
            <tr><td colspan="4">Descripción<span class="asterisco">(*)</span></td></tr>
            <tr><td colspan="4">@Html.TextArea("vDescr", null, new { style="width:700px;", onblur="javascript:onBlurUpper(this);", maxlength = 450, ondblclick="javascript:cleanBox(this);", onkeypress="return validaAlfaNumTamanio(this, event, 450);"})</td></tr>
            </tbody>
            </table>
        </td>
    </tr>
</table>
</fieldset>
<br/>
<fieldset style="width: 750px;" class="fieldsetStyle1">
<legend class="tituloBlue9">DATOS ADICIONALES DE LA CONVOCATORIA</legend>
    <table border="1" style="width: 100%;" cellpadding="1" cellspacing="0" class="tablaDetalle1" id="rpp">
        <tbody id="tbody1">
        <tr id="tr1">
            <td style="background-color:#e2e2b5;width:15px;" align="center" id="tdDiv1">
                <div class="tituloBlue9" id="divPag2">1</div>
                <input type="hidden"  id="inputPag2" name="inputPag2"  value   ="1"/>
            </td>
            <td id="td1">
                <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" id="merry">
                    <tr id="trDuplicar">
                        <td>
                            <table border="0" style="width: 100%;" cellpadding="1" cellspacing="0" id="francisco">
                            <tbody class="tituloCelesteN8">
                                <tr align="center">
                                    <td>País Emisor<span class="asterisco">(*)</span></td>
                                    <td>Tipo documento<span class="asterisco">(*)</span></td>
                                    <td>Número documento<span class="asterisco">(*)</span></td>
                                    <td>Razón Social de la Institución Educativa<span class="asterisco">(*)</span></td>
                                </tr>
                                <tr id="trExitosa1" align="center">
                                    <td>
                                        @Html.HiddenFor(model => model.nIdeEmpresa)                                        
                                        @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, new { @class = "select8" })
                                    </td>
                                    <td>
                                        @Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })
                                    </td>
                                    <td>
                                        @Html.TextBox("vNumDocum", null, new { style = "width:100px;", maxlength = 20 })
                                    </td>
                                    <td colspan ="3" align="left">
                                        @Html.TextBox("vNombres", null, new { style = "width:370px;", maxlength = 50,onkeypress="return validaAlfaNumTamanio(this, event, 50);" })
                                    </td>                           
                                </tr>
                                <tr><td colspan="4"><hr /></td></tr>
                                <tr id="trDuplicar2">
                                    <td colspan="4">
                                        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;" class="tablaDetalle3" id="fgh">
                                        <tbody class="tituloCelesteN8">
                                            <tr id="trDuplicar3">                                                
                                                <td style="width:10px;" id="tdImg1" >
                                                    <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" id="imgBorrar" alt="ELIMINAR" style="display:none" onclick="javascript:deleteConceptoInterno(this,4,2,16);"   />
                                                    <img src="@Url.Content("~/images/mas.gif")" class="lupita2" id="imgAgregar" alt="AGREGAR" onclick="javascript:clonarConceptoInterno(this,4,16);"/>
                                                </td>
                                                <td style="background-color:#e2e2b5;">
                                                    <div class="tituloBlue9" id="divPag1">
                                                        1.1
                                                    </div>                                                    
                                                </td>
                                                <td>
                                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;" id="exitosa">
                                                    <tbody class="tituloCelesteN8">
                                                        <tr>
                                                            <td>Nivel de Estudio<span class="asterisco">(*)</span></td>                                                            
                                                            <td>Concepto/Especialidad<span class="asterisco">(*)</span></td>
                                                            <td>Modalidad de Estudio<span class="asterisco">(*)</span></td>
                                                            <td># de becas<span class="asterisco">(*)</span></td>
                                                            <td align="center">Nuevo</td>
                                                        </tr>
                                                        <tr id="trExitosa2">
                                                            <td>@Html.DropDownList("nIdeNivelEstudio_1", (IEnumerable<SelectListItem>)ViewBag.GrupoNIvelConvoca, "--Seleccione--", new { @class = "select8", onchange="javascript:cargaConcepto(this,'2');"})</td>
                                                            <td>
                                                                <div id="divConcepto">
                                                                    <select id="nIdeConcepto_1" name="nIdeConcepto_1" style="width:200px;" >
                                                                        <option value="">--Seleccione--</option>
                                                                    </select>
                                                                </div>
                                                            </td>
                                                            <td>@Html.DropDownList("nIdeModalidadEstudio_1", (IEnumerable<SelectListItem>)ViewBag.ModalidadEstudio, "--Seleccione--", new { @class = "select8" , onchange="javascript:verificaTarifa(this,12);"})</td>
                                                            <td>
                                                                @Html.TextBox("nNumeroBeca_1", null, new { style = "width:40px;", maxlength = 2, onkeypress = "return validarSoloNumeros(event);" })
                                                                @Html.HiddenFor(model => model.nIdeTarifa_1)
                                                            </td>
                                                            <td align="center"><img src="@Url.Content("~/images/nuevo.gif")" class="lupita2" id="imgBuscar" alt="BUSCAR TARIFARIO" onclick="javascript:buscarTarifario(this,12,'#divTarifario');"/></td>
                                                        </tr>
                                                    </tbody>
                                                    </table>
                                                </td>                                                
                                            </tr>
                                        </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>            
            <td style="width:10px;" id="imgPrincipal">
                <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINARPRIN" id="imgBorrarPrincipal" style="display:none" onclick="javascript:deleteConceptoPrincipal(this,4,2);"   />
                <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGARPRIN"  id="imgAgregarPrincipal" onclick="javascript:clonarConceptoPrincipal(this,4);"/>
            </td>                        
        </tr>
    </tbody>
    </table>

    <table border="0" cellpadding="10" cellspacing="0" style="width:100%;">
        <tr>
            <td width="50%" valign="bottom"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="50%" valign="bottom"><input type="button" value="Registrar Convocatoria" onclick="javascript: addNuevaConvocatoria(this,this.form);" /></td>
        </tr>
    </table>
</fieldset>
@Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
}
<div id="divTarifario"></div>
</center>
